<meta charset="utf-8">

<div class="box box-primary" id="pmpTasks_assignHours">
		<div class="box-body">
		<form action="" id="pmpTasks_assignHours_form">
					<div class="form-group">
							<label for="title">评估时间（小时）</label> 
							<input type="number"  name="assignHours" v-model="assignHours" class="form-control" id="assignHours" required="required"/>
					</div>
					</form>
		</div>
		
		<div class="box-footer">
			<button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
			<button type="button" class="btn btn-info pull-right" v-on:click="doAsign">提交</button>
		</div>
		
</div>
<script type="text/javascript">
	new Vue({
			el : '#pmpTasks_assignHours',
			data : {
				 projectId: project_detail_main.$data.projectId,
				 taskId: zfesLayerEditDg.getLayerParam().id,
				 assignHours: zfesLayerEditDg.getLayerParam().assignHours,
				bus : new Vue()
			},
			mounted : function() {
				var _this = this;
			},
			methods : {
				doAsign : function() {
					if ($("#pmpTasks_assignHours_form").valid()) {
						var _this = this;
				        var url = "/pmp/service/pm/pmpTasks/updateAssignHours";
				       zfesAjax.ajaxTodo(url, {"id":_this.taskId,"assignHours": _this.assignHours}, function(data) {
				    	   alertSwal.successText(data.message);
							layer.close(layer.index);
				       });
					}
				},
				cancel : function() {
					layer.close(layer.index);
				}
			}
		});
</script>
